home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / usr / share / doc / mktemp / README < prev   
Text File  |  2001-11-26  |  2KB  |  57 lines

  1. What/why is mktemp?
  2. ===================
  3. Mktemp is a simple utility designed to make temporary file handling
  4. in shells scripts be safe and simple.  Traditionally, people writing
  5. shell scripts have used constructs like:
  6.  
  7.     TFILE=/tmp/foop.$$
  8.  
  9. which are trivial to attack.  If such a script is run as root it may
  10. be possible for an attacker on the local host to gain access to the
  11. root login, corrupt or unlink system files, or do a variety of other
  12. nasty things.
  13.  
  14. The basic problem is that most shells have no equivalent to open(2)'s
  15. O_EXCL flag.  While it is possible to avoid this using temporary
  16. directories, I consider the use of mktemp(1) to be superior both in terms
  17. of simplicity and robustness.  See the man page for more information.
  18.  
  19. I originally wrote mktemp(1) for the OpenBSD operating system and
  20. this version tracks any changes made to the mktemp(1) included with
  21. OpenBSD.  Subsequently, many of the major Linux distributions started
  22. to include it in their distributions.  I strongly encourage other
  23. OS vendors to either include mktemp(1) or something like it with
  24. their base OS.
  25.  
  26. Where to get it
  27. ===============
  28. The latest version of mktemp may always be gotten via anonymous ftp
  29. from ftp.mktemp.org in the directory /pub/mktemp/.  You can also
  30. find it on the web at http://www.mktemp.org/dist/.
  31.  
  32. Copyright
  33. =========
  34. Mktemp is distributed under a BSD-style license.  Please refer to
  35. the `LICENSE' file included with the release for details.  If you
  36. are an OS vendor who would like to bundle mktemp(1) but its license
  37. is unacceptable to you, please contact me--we can probably work
  38. something out.
  39.  
  40. Web page
  41. ========
  42. There is a mktemp `home page' at http://www.mktemp.org/
  43. that contains on-line documentation and other information.
  44.  
  45. Mailing lists
  46. =============
  47. The mktemp-announce mailing list receives new release announcements and
  48. information about mktemp-related security issues.
  49.  
  50. To subscribe, please visit the following web page:
  51.     http://www.mktemp.org/mailman/listinfo/mktemp-announce
  52.  
  53. Bug reports
  54. ===========
  55. If you find a bug in mktemp, please use the bug database on the web
  56. at http://www.mktemp.org/bugs/.
  57.